home *** CD-ROM | disk | FTP | other *** search
/ CD World Haziran 1997 / CD World Haziran 1997.iso / Cesitlemeler / Directx 3.0 / dx3.exe / SDK / SAMPLES / DUEL / DUEL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-04  |  1.9 KB  |  83 lines

  1. /*==========================================================================
  2.  *
  3.  *  Copyright (C) 1995-1996 Microsoft Corporation. All Rights Reserved.
  4.  *
  5.  *  File:   duel.h
  6.  *  Content:    main include file
  7.  *
  8.  *
  9.  ***************************************************************************/
  10.  
  11. #ifndef DUEL_INCLUDED
  12. #define DUEL_INCLUDED
  13.  
  14. #define WIN32_LEAN_AND_MEAN
  15. #include <windows.h>
  16. #include <windowsx.h>
  17. #include <mmsystem.h>
  18. #include "resource.h"
  19. #include <tchar.h>
  20.  
  21. /*
  22.  * Application messages
  23.  */
  24.  
  25. #define UM_LAUNCH       WM_USER
  26. #define UM_ABORT        WM_USER+1
  27. #define UM_RESTARTTIMER WM_USER+2
  28.  
  29. // program states
  30. enum
  31. {
  32.     PS_SPLASH,
  33.     PS_ACTIVE,
  34.     PS_REST
  35. };
  36.  
  37. #define     MAX_SCREEN_X    639
  38. #define     MAX_SCREEN_Y    479
  39. #define     MAX_PLAYERNAME  50
  40. #define     MAX_SESSIONNAME 50
  41. #define     MAX_SPNAME      50
  42. #define     MAX_CLASSNAME   50
  43. #define     MAX_WINDOWTITLE 50
  44. #define     MAX_ERRORMSG    256
  45. #define     MAX_FONTNAME    50
  46. #define     MAX_HELPMSG     512
  47.  
  48. #define     RECEIVE_TIMER_ID    1
  49. #define     RECEIVE_TIMEOUT     1000    // in milliseconds
  50.  
  51. // default window size
  52. #define     MAX_DEFWIN_X    640
  53. #define     MAX_DEFWIN_Y    480
  54.  
  55.  
  56. // tree view image info
  57. #define CX_BITMAP       25
  58. #define CY_BITMAP       25
  59. #define NUM_BITMAPS      2
  60.  
  61. // registry info
  62. #define DUEL_KEY (TEXT("Software\\Microsoft\\Duel"))
  63.  
  64. // macros
  65. #define DEBUG_OUT(s) OutputDebugString(s);
  66.  
  67. /*
  68.  * fn prototypes
  69.  */
  70.  
  71. int WINAPI      WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,
  72.                         int nCmdShow );
  73. long WINAPI     MainWndproc( HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam );
  74. BOOL            InitApplication(HINSTANCE hinst);
  75. void            CleanupApplication(void);
  76. BOOL            LaunchedByLobby(void);
  77. BOOL            ShowError( int err );
  78. HWND            ShowConnectStatus(void);
  79. void            UpdateTitle(void);
  80.  
  81. #endif
  82.  
  83.